package com.lei.view.weather;

import java.awt.Graphics;

import javax.swing.ImageIcon;
import javax.swing.JPanel;

import com.lei.applt.imglist.BackgroundImage;
import com.lei.emun.FilePathEnum;
import com.lei.util.FrameUtil;

public class WeatherContent extends JPanel{

	private static final long serialVersionUID = 1L;
	private   int width = 1030,height = 800;
	  private ImageIcon bgimg;
	
	public WeatherContent() {
		initImage();
		initFrame();
		initAssembly();
		addListenner();
		repaint();
	}

	private void initImage() {
		bgimg= FrameUtil.getImage(FilePathEnum.WEATHER, "weahter_rain.gif");
	}

	private void initFrame() {
    	this.setVisible(true);
    	this.setSize( width, height-100);
    	this.setLayout(null);
    	this.add(new WeatherPanel());
    	this.setOpaque(false);
	}

	private void initAssembly() {
		
	}

	private void addListenner() {
		
	}
	
	@Override
	public void paint(Graphics g) {
		g.drawImage(bgimg.getImage(),0, 0,this.getWidth(),this.getHeight()-200, this);
		super.paint(g);
	}
}
